Skip to content

Add URL health view and expose health in data source sync/API#598

Open
maxachis wants to merge 1 commit intodevfrom
issue-341-url-health
Open

Add URL health view and expose health in data source sync/API#598
maxachis wants to merge 1 commit intodevfrom
issue-341-url-health

Conversation

@maxachis
Copy link
Collaborator

Summary

  • add a derived url_health_view (SQL view + ORM model + enum) to separate URL health from labeling status
  • use health-derived fields in data-source sync add/update payload generation (url_status + archive URL)
  • expose structured url_health on data source GET responses
  • expand data-source update sync prerequisites so health-related source changes trigger updates
  • update integration tests for readonly data source GET and data-source sync add/update payload assertions

Testing

  • docker compose up -d (from local_database/)
  • POSTGRES_USER=test_source_collector_user POSTGRES_PASSWORD=HanviliciousHamiltonHilltops POSTGRES_DB=source_collector_test_db POSTGRES_HOST=127.0.0.1 POSTGRES_PORT=5432 UV_CACHE_DIR=/tmp/uv-cache uv run pytest tests/automated/integration/readonly/api/data_sources/test_get.py tests/automated/integration/tasks/scheduled/impl/sync_to_ds/data_source/test_add.py tests/automated/integration/tasks/scheduled/impl/sync_to_ds/data_source/update/test_update_url.py -q
  • result: 3 passed

Copy link
Contributor

@josh-chamberlain josh-chamberlain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice! getting this back on API requests is wonderful...seeing it in the UI would be neat: Police-Data-Accessibility-Project/pdap.io#421

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants